cmake_minimum_required(VERSION 3.2)
set(CMAKE_BUILD_TYPE Debug)

set(PROJECT_NAME
    nanobdd
)
set(LIBRARY_NAME
  nanobdd
)
set(LIBRARY_HEADERS_DIR
    include/${LIBRARY_NAME}
)
set(LIBRARY_HEADERS
    ${LIBRARY_HEADERS_DIR}/nanobdd.h
)
set(LIBRARY_SOURCE_DIR
    src
)
set(LIBRARY_SOURCE
  ${LIBRARY_SOURCE_DIR}/nanobdd.cpp
  ${LIBRARY_SOURCE_DIR}/bdd.cpp
)

project(${PROJECT_NAME})

add_library(${LIBRARY_NAME} STATIC
    ${LIBRARY_HEADERS}
    ${LIBRARY_SOURCE}
)

target_include_directories(${LIBRARY_NAME} PRIVATE
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/${LIBRARY_NAME}>
    $<INSTALL_INTERFACE:include/${LIBRARY_NAME}>
)

target_include_directories(${LIBRARY_NAME} PUBLIC
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
    $<INSTALL_INTERFACE:include>
)

add_executable(test
  test/main.cpp
)

target_link_libraries(test
  ${LIBRARY_NAME}
)